<template>

  <el-container>
    <el-header>CPI</el-header>
    <el-container>
      <el-aside width="200px">
        <el-menu router background-color="#2B4B6B" text-color="#FFF" active-text-color="#409EFF" unique-opened>
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-s-platform"></i>
              <span>CPI查询管理</span>
            </template>
            <el-menu-item index="/byProvince">
              <i class="el-icon-user"></i>
              <span slot="title">按省份查询</span>
            </el-menu-item>
            <el-menu-item index="/byType">
              <i class="el-icon-document"></i>
              <span slot="title">按种类查询</span>
            </el-menu-item>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-s-platform"></i>
              <span>CPI管理</span>
            </template>
            <el-menu-item index="/cpiManage">
              <i class="el-icon-user"></i>
              <span slot="title">cpi数据管理</span>
            </el-menu-item>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-s-platform"></i>
              <span>CPI分析</span>
            </template>
            <el-menu-item index="/welcome">
              <i class="el-icon-user"></i>
              <span slot="title">用户画像分析</span>
            </el-menu-item>
          </el-submenu>

        </el-menu>
      </el-aside>
      <el-main>
        <router-view />
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
  export default {
    data() {
      return {
        msg: '这是我的布局组件'
      }
    }
  }
</script>

<style scoped>
  .el-header {
    background-color: #2B4B6B;
    display: flex;
    justify-content: space-between;
    padding-left: 10px;
    align-items: center;
    color: white;
    font-size: 18px;
  }

  .el-aside {
    color: white;
    background-color: #2B4B6B;
  }

  .el-main {
    background-color: aliceblue;
  }

  .el-container {
    height: 100%;
  }
</style>
